﻿using System;

namespace Iot.AlarmDispose.Database.Entities;

/// <summary>
///     告警分类模型
/// </summary>
public interface IAlertClassify : IDbId<int>, ISoftDelete
{
    /// <summary>
    ///     告警路径
    /// </summary>
    string Path { get; init; }

    /// <summary>
    ///     告警名称显示内容
    /// </summary>
    string Alarm { get; init; }

    /// <summary>
    ///     告警计数
    /// </summary>
    int Count { get; set; }

    /// <summary>
    ///     超过阈值次数
    /// </summary>
    int BeyondLimit { get; init; }
}

public class DefaultAlertClassify : IAlertClassify
{
    public int Id { get; set; }
    public required string Path { get; init; }
    public required string Alarm { get; init; }
    public bool IsDeleted { get; set; }
    public DateTime DeletedOnly { get; set; }
    public int Count { get; set; }
    public int BeyondLimit { get; init; }
}